package com.woniu.gf.pawn.comm.core.exception;

/**
 * @BelongsProject: gf-pawn-comm
 * @BelongsPackage: com.woniu.gf.pawn.comm.core.exception
 * @Author: rofus
 * @CreateTime: 2020-10-08 18:37
 * @Description: 典当异常编码
 */
public enum PawnExceptionCode {
    SYS_URL_NOT(404,"访问资源不存在"),
    USER_AUTHE_ERROR(2001,"用户名或者密码错误"),
    USER_AUTHE_NOTLOGIN(2002,"用户未登陆"),
    USER_AUTHE_TOKEN_PARSE(2003,"TOKEN解析错误"),
    USER_AUTHE_TOKEN_EXPIRE(2004,"TOKEN已过期"),
    USER_AUTHE_UNAUTHORIZED(2005,"用户未授权"),
    USER_NONENTITY(2010,"用户不存在"),
    USER_SMSCODE_ERROR(2006,"短信验证码错误"),
    USER_PHONE_NONENTITY(2007,"用户电话号不存在"),
    USER_ADD_NAME_EXIST(2008,"用户名重复"),
    USER_ADD_PHONE_EXIST(2009,"电话号码重复"),
    STORE_MANAGEMENT_NONENTITY(2010,"管理员不存在"),
    USER_TWICE_PASSWORD_ERROR(2011,"两次密码不一致"),
    USER_OLD_AND_NEW_PASSWORD_EQUAL_ERROR(2012,"与旧密码相同"),
    USER_OLD_PASSWORD_ERROR(2013,"旧密码与当前用户不匹配"),
    USER_ADMIN_BAN_ERROR(2014,"超级管理员不能封禁"),

    JSON_PARSE(3001,"JSON解析错误"),

    SENTINEL_BLOCK(4001,"资源限流"),

    SYS_ERROR(500,"出现异常"),

    LOCK_ERROR(5001,"加锁失败"),

    ROLE_NAME_EXIST(6001,"角色名已存在"),
    ROLE_ID_NONENTITY(6002,"角色不存在"),

    PERMISSION_ID_NONENTITY(7001,"权限不存在"),

    STORE_ID_NONENTITY(8001,"仓库不存在");




    private Integer code;

    private String msg;

    PawnExceptionCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
